// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CmsBlock generated by hbm2java
 */
@Entity
@Table(name = "cms_block", catalog = "magento")
public class CmsBlock implements java.io.Serializable {

	private Short blockId;
	private String title;
	private String identifier;
	private String content;
	private Date creationTime;
	private Date updateTime;
	private short isActive;
	private Set coreStores = new HashSet(0);

	public CmsBlock() {
	}

	public CmsBlock(String title, String identifier, short isActive) {
		this.title = title;
		this.identifier = identifier;
		this.isActive = isActive;
	}

	public CmsBlock(String title, String identifier, String content,
			Date creationTime, Date updateTime, short isActive, Set coreStores) {
		this.title = title;
		this.identifier = identifier;
		this.content = content;
		this.creationTime = creationTime;
		this.updateTime = updateTime;
		this.isActive = isActive;
		this.coreStores = coreStores;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "block_id", unique = true, nullable = false)
	public Short getBlockId() {
		return this.blockId;
	}

	public void setBlockId(Short blockId) {
		this.blockId = blockId;
	}

	@Column(name = "title", nullable = false)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "identifier", nullable = false)
	public String getIdentifier() {
		return this.identifier;
	}

	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}

	@Column(name = "content", length = 16777215)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "creation_time", length = 19)
	public Date getCreationTime() {
		return this.creationTime;
	}

	public void setCreationTime(Date creationTime) {
		this.creationTime = creationTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "is_active", nullable = false)
	public short getIsActive() {
		return this.isActive;
	}

	public void setIsActive(short isActive) {
		this.isActive = isActive;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "cms_block_store", catalog = "magento", joinColumns = { @JoinColumn(name = "block_id", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "store_id", nullable = false, updatable = false) })
	public Set getCoreStores() {
		return this.coreStores;
	}

	public void setCoreStores(Set coreStores) {
		this.coreStores = coreStores;
	}

}
